home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / ckcd11.zip / CHECK.BAT next >
DOS Batch File  |  1989-09-15  |  744b  |  37 lines

  1. break off
  2. echo off
  3. rem
  4. rem CHECK.BAT
  5. rem
  6. rem Sample batch file which uses ckcd.com to check for carrier on COM1:
  7. rem and activate the ubiquitous WATCHDOG utility only if carrier is detected.
  8. rem Used as part of a BBS email checking facility.
  9. rem
  10. ckcd 1
  11. if ERRORLEVEL 2 goto oops
  12. if ERRORLEVEL 1 goto dogon
  13. if ERRORLEVEL 0 goto nodog
  14.  
  15. rem jumps here is there's an error
  16. :oops
  17. echo Error occurred while checking carrier!
  18. goto exit
  19.  
  20. rem jumps here if CD high (remote mode)
  21. rem turns WATCHDOG on
  22. rem
  23. :dogon
  24. watchdg1 on
  25.  
  26. rem jumps here to skip the watchdog invocation (local mode)
  27. rem
  28. :nodog
  29. rem
  30. rem Do whatever you want here - in this case, we check for mail
  31. rem
  32. getmb3
  33. watchdg1 off
  34.  
  35. :exit
  36. rem end of batch file
  37.